package cn.example.vip.mall.goods;

import cn.example.vip.mall.config.RedisConfig;
import cn.example.vip.mall.config.StartConfig;
import cn.example.vip.mall.filter.CORSFilter;
import cn.example.vip.mall.goods.seata.SeataDataSourceProxy;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.cache.annotation.EnableCaching;

@EnableCaching	// 开启Redis缓存
@MapperScan("cn.example.vip.mall.goods.mapper")	// Mybatis
//@ConfigurationPropertiesScan({"cn.example.vip.mall.config"})
@ImportAutoConfiguration({
	StartConfig.class,
	RedisConfig.class,
	CORSFilter.class
})
@ConfigurationPropertiesScan(basePackageClasses = {
	SeataDataSourceProxy.class
})
@SpringBootApplication
public class MallGoodsApplication {
	public static void main(String[] args) {
		SpringApplication.run(MallGoodsApplication.class, args);
	}
	
	/**
	 * 创建分页拦截器
	 * @return
	 *//*
	@Bean
	public PaginationInterceptor paginationInterceptor() {
		PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
		// 设置数据库类型
		paginationInterceptor.setDbType(DbType.MYSQL);
		return paginationInterceptor;
	}*/
}
